Optimal. Leaf size=65 \[ -\frac {\log \left (2 \cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )}{4 d}+\frac {\log \left (2 \cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )}{4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 65, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {2738, 212}
\begin {gather*} \frac {\log \left (\sin \left (\frac {1}{2} (c+d x)\right )+2 \cos \left (\frac {1}{2} (c+d x)\right )\right )}{4 d}-\frac {\log \left (2 \cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )}{4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 2738
Rubi steps
\begin {align*} \int \frac {1}{3+5 \cos (c+d x)} \, dx &=\frac {2 \text {Subst}\left (\int \frac {1}{8-2 x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{d}\\ &=-\frac {\log \left (2 \cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )}{4 d}+\frac {\log \left (2 \cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )}{4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 65, normalized size = 1.00 \begin {gather*} -\frac {\log \left (2 \cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )}{4 d}+\frac {\log \left (2 \cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )}{4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.05, size = 34, normalized size = 0.52
method | result | size |
derivativedivides | \(\frac {\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2\right )}{4}-\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-2\right )}{4}}{d}\) | \(34\) |
default | \(\frac {\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2\right )}{4}-\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-2\right )}{4}}{d}\) | \(34\) |
norman | \(-\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-2\right )}{4 d}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2\right )}{4 d}\) | \(36\) |
risch | \(\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {3}{5}+\frac {4 i}{5}\right )}{4 d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {3}{5}-\frac {4 i}{5}\right )}{4 d}\) | \(40\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 48, normalized size = 0.74 \begin {gather*} \frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 2\right ) - \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 2\right )}{4 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 46, normalized size = 0.71 \begin {gather*} \frac {\log \left (\frac {3}{2} \, \cos \left (d x + c\right ) + 2 \, \sin \left (d x + c\right ) + \frac {5}{2}\right ) - \log \left (\frac {3}{2} \, \cos \left (d x + c\right ) - 2 \, \sin \left (d x + c\right ) + \frac {5}{2}\right )}{8 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.32, size = 41, normalized size = 0.63 \begin {gather*} \begin {cases} - \frac {\log {\left (\tan {\left (\frac {c}{2} + \frac {d x}{2} \right )} - 2 \right )}}{4 d} + \frac {\log {\left (\tan {\left (\frac {c}{2} + \frac {d x}{2} \right )} + 2 \right )}}{4 d} & \text {for}\: d \neq 0 \\\frac {x}{5 \cos {\left (c \right )} + 3} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 34, normalized size = 0.52 \begin {gather*} \frac {\log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2 \right |}\right ) - \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \right |}\right )}{4 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.36, size = 17, normalized size = 0.26 \begin {gather*} \frac {\mathrm {atanh}\left (\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2}\right )}{2\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________